/**
 * 
 */
package mdb.com.vn.persist;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import mdb.com.vn.model.SmeSms;

import org.springframework.stereotype.Repository;

/**
 * @author tu.dod
 *
 */
@Repository("smeSmsDAO")
public class SmeSmsDAOImpl extends AbstractHibernateDAOImpl<SmeSms, Integer> implements SmeSmsDAO, Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	protected Class<SmeSms> getDomainClass() {
		// TODO Auto-generated method stub
		return SmeSms.class;
	}

	@Override
	public SmeSms findBySmeSmsByProperties(String gcif, Date processDate) {
		// TODO Auto-generated method stub
		return (SmeSms) getSession().getNamedQuery("SmeSms.findByPDateStatus").setString("gcif", gcif).setDate("processDate", processDate).uniqueResult();
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<SmeSms> findBySmeSmsByStatuss(String status) {
		// TODO Auto-generated method stub
		return getSession().getNamedQuery("SmeSms.findByStatus").setString("status", status).list();
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<SmeSms> findByDateStatus(String status, Date processDate) {
		// TODO Auto-generated method stub
		return getSession().getNamedQuery("SmeSms.findByDateStatus").setString("status", status).setDate("processDate", processDate).list();
	}
}
